1. Field of the Invention
The present invention relates to an apparatus and a method for managing a file system, and more particularly, to an apparatus and a method for managing a file system that can efficiently use a data block of the file system.
2. Description of the Related Art
File systems have been continuously studied since the computer was first introduced, and many file systems have been produced. Typically, examples of the file system include the Unix File System (UFS), System File System (SFS), Veritas File System (VxFS), Remote File Sharing (RFS), and Network File System (NFS).
These stable and efficient file systems are widely used in commerce, but they have the following defects. In two of these systems, the Unix File System and the System File System, initially formatted structures cannot be changed later, and the whole file system can only be backed up to a file system having the same format and size. In the Veritas File System, it is possible to change the initially formatted file system because it is continuously augmented, but it can only be backed up by another Veritas file system being at least the same size. The network File System and the Remote File Sharing are not new. They are mechanisms that support shared use of a file system among several computers.
FIG. 1 is a diagram of a conventional format of a file system.
Referring to FIG. 1, the conventional file system format comprises a data block area 11 to store data and a block map area 12 to store block maps which include information about the data stored in the data block area 11.
The data block area 11 consists of a plurality of data blocks uniform in size, and the block map of the block map area 12 includes information on the data stored in each data block, i.e., the size of the data block. Also, the block map may include details on the relationships between respective data blocks when the data having a predetermined size exceeds the data block size.
FIG. 2 is a diagram of a conventional format of a file system illustrating how data is stored in the data area block area 11 of FIG. 1. By way of example, it is assumed that the size of each data block in the data block area 11 is 100 KB. It is also assumed that only data is stored in each data block.
Referring to FIG. 2, data is stored in each data block of the data block area 11. Here, each data block is allotted to one set of data regardless of the size of the data to be stored. Accordingly, one data block is allotted to 10 KB of data and another is allotted to 70 KB. Accordingly, 90 KB is unused when 10 KB of data is stored, and 30 KB is unused when 70 KB of data is stored. If the size of the stored data exceeds the size of one data block, the data may be stored in several data blocks.
As described above, if the stored data size does not exceed one data block, the unused empty space will be wasted. The storage efficiency of this system is poor because space is wasted even when the size of the data exceeds one data block.
Korean Unexamined Patent Publication No. 2000-0020057 discloses a method for composing a dynamic file system comprising determining the useful space of a file system, determining a data block size among the useful blocks, generating an arbitrary file, and composing the arbitrary file as a dynamic file. However, the block is separately determined, and therefore, it is difficult to apply this to every data block.